package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AssignmentsMapper;
import com.ruoyi.system.domain.Assignments;
import com.ruoyi.system.service.IAssignmentsService;

/**
 * 作业Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
@Service
public class AssignmentsServiceImpl implements IAssignmentsService 
{
    @Autowired
    private AssignmentsMapper assignmentsMapper;

    /**
     * 查询作业
     * 
     * @param assignmentId 作业主键
     * @return 作业
     */
    @Override
    public Assignments selectAssignmentsByAssignmentId(Long assignmentId)
    {
        return assignmentsMapper.selectAssignmentsByAssignmentId(assignmentId);
    }

    /**
     * 查询作业列表
     * 
     * @param assignments 作业
     * @return 作业
     */
    @Override
    public List<Assignments> selectAssignmentsList(Assignments assignments)
    {
        return assignmentsMapper.selectAssignmentsList(assignments);
    }

    /**
     * 新增作业
     * 
     * @param assignments 作业
     * @return 结果
     */
    @Override
    public int insertAssignments(Assignments assignments)
    {
        return assignmentsMapper.insertAssignments(assignments);
    }

    /**
     * 修改作业
     * 
     * @param assignments 作业
     * @return 结果
     */
    @Override
    public int updateAssignments(Assignments assignments)
    {
        return assignmentsMapper.updateAssignments(assignments);
    }

    /**
     * 批量删除作业
     * 
     * @param assignmentIds 需要删除的作业主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentsByAssignmentIds(Long[] assignmentIds)
    {
        return assignmentsMapper.deleteAssignmentsByAssignmentIds(assignmentIds);
    }

    /**
     * 删除作业信息
     * 
     * @param assignmentId 作业主键
     * @return 结果
     */
    @Override
    public int deleteAssignmentsByAssignmentId(Long assignmentId)
    {
        return assignmentsMapper.deleteAssignmentsByAssignmentId(assignmentId);
    }
}
